<?php 
define('APPSESSION','1.00');
/************************************************************************/
/* FrameWork  test preview                                              */
/* ==================================================================== */
/*                                                                      */
/* This program is free software. You can redistribute it and/or modify */
/* it under the terms of the GNU General Public License as published by */
/* the Free Software Foundation; either version 2 of the License.       */
/************************************************************************/

//_admin session

//carica la lingua se esiste
$lang=lang();
switch($lang){
    case "en":
	define("_ADMIN_PREFERENCE","ADMIN PREFERENCE");
	define("_CHANGE_PREFERENCES","change preferences");
	define("_CHANGE_PASSWORD","Change Password");
	define("_RETYPE_PASSWORD","Retype Password");
	define("_SET_PASSWORD","change password");
	define("_ADMINISTRATION_PRIVILEGE_REQUESTED", "administration privilege requested");
	define("_CHANGE","Change");
	define("_CONTINUA","Continue");
	break;
    default;
	define("_ADMIN_PREFERENCE","ADMIN PREFERENCE");
	define("_CHANGE_PREFERENCES","change preferences");
	define("_CHANGE_PASSWORD","Change Password");
	define("_SET_PASSWORD","change password");
	define("_RETYPE_PASSWORD","Retype Password");
	define("_ADMINISTRATION_PRIVILEGE_REQUESTED", "administration privilege requested");
	define("_CHANGE","Change");
	define("_CONTINUA","Continua");
	break;
}




?>
    <p>
      <?php if (!admin_isadmin()) { ?>
        <form action="index.php?admin_op=startsession" method="post" enctype="multipart/form-data">
        Password <input name='password' type="password" value="" />
        <input type="submit" value="startsession">
        </form>
      <?php }else{ ?>
	<h3 class='table'><?=_ADMIN_PREFERENCE?>:</h3>
	<h3><?=_CHANGE_PREFERENCES?></h3>


	<div class='table'>
	    <form name='admin' action="index.php?appname=_admin&admin_op=setpassword" method="post" enctype="multipart/form-data" onsubmit="if( document.admin.password.value != document.admin.password2.value ){alert('wrong password entry: please retype');return false;}">
	    <b><?=_CHANGE_PASSWORD?></b> <input name='password' type="password" value=""/>
	    <b><?=_RETYPE_PASSWORD?></b> <input name='password2' type="password" value="" />
	    <input type="submit" value="<?=_SET_PASSWORD?>">
	    </form>
	</div>
	<hr/>
        <form action="index.php?admin_op=stopsession"  method="post" enctype="multipart/form-data">
        <center><input type="submit" value="stopsession"></center>
        </form>
      <?php }?>
    </p>
